class Customer
  attr_reader :id, :login, :fname, :lname, :passwordmd5, :money_spended
  attr_accessor :id, :login, :fname, :lname, :passwordmd5, :money_spended
  def initialize(id, login, fname,lname, passwordmd5)
    @id=id
    @login=login
    @fname=fname
    @lname=lname
    @passwordmd5=passwordmd5
    @money_spended=0
  end
end

def customer_login_check(login, password, customers)
  customers.each do |customer|
    if customer.login==login && customer.passwordmd5 == password
      return customer
      break
    end
  end
  false
end

def does_customer_login_not_exist(login, customers)
  does_not_exist=true
  customers.each do |customer|
    if customer.login == login
      does_not_exist=false
      break
    end
  end
  does_not_exist
end